//最外框的角总是被磨平，叠筐与叠筐之间有一行间隔
#include <cstdio>

int main() {
    int n;//外框长度
    char inner,outter;
    while(scanf("%d %c %c",&n,&inner,&outter)!=EOF){
    //%d %f %o忽略空白字符
    //%c 可以读取空白字符
        char pattern[80][80]={0};
        //初始化
        int init = n/2;//第一个点
        int length=1;
        int x,y;
        char curChar = inner;
        for(length = 1,x=n/2,y=n/2;length<=n;length = length +2,--x,--y){
            //x，y是起点下标
            //每一次填满一个长度为length的正方形
            for(int i=x,j=y;i<x+length;++i){
                //j不变
                pattern[i][j]= curChar;
            }
            for(int i=x,j=y;j<y+length;++j){
                pattern[i][j]= curChar;
            }
            for(int i=x+length-1,j=y;j<y+length;++j){
                pattern[i][j]= curChar;
            }
            for(int i=x,j=y+length-1;i<x+length;++i){
                pattern[i][j]= curChar;
            }
            //更换花色
            if(curChar==inner){
                curChar=outter;
            } else{
                curChar=inner;
            }
        }
        //磨掉四个角
        if(n!=1){
            pattern[0][0]=' ';
            pattern[0][n-1]=' ';
            pattern[n-1][0]=' ';
            pattern[n-1][n-1]=' ';
        }
        for (int i = 0; i < n; ++i) {
            printf("%s\n",pattern[i]);
        }
    }
    return 0;
}
